/**
 * 每天的定时执行的任务，放这个类中，使用Spring调度器
 */
package com.jhws.core.spring.TimerTask;

import com.jhws.business.card.service.ITblCardDimService;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

@Component
public class EveryDayTimerTask {

    @Resource
    ITblCardDimService ICardService;

    /**
     * 更新IC卡的过期状态
     * 执行时间,每天0点5分钟
     * @throws Exception
     */
    @Scheduled(cron = "0 5 0 * * *")
    void taskCheckICCardExipre() throws Exception{
        ICardService.updateExpireStateByNow();
    }
}
